import os
from math import floor
import openpyxl
from master.mongo_operator import MongoHelper
import master.settings as settings
import pandas as pd
import matplotlib.pyplot as plt
from datetime import datetime, timedelta
from germansentiment import SentimentModel

# from textblob_de import TextBlobDE

db = "test"
col = '2011_asdfgh'

d = {
    "_id": "aa49b8764a4837cf69cc6e4c2c27eaf0",
    "user_id": "135118180",
    "user_screen_name": "PingkanJulia",
    "user_name": "☀",
    "src_user_id": "135118180",
    "src_user_screen_name": "PingkanJulia",
    "src_user_name": "☀",
    "tweet_id": "135118180/status/86863394581393409",
    "full_text": "Setengah 2?what?asdfgh belom ngantukkkkkkk",
    "reply_to": "",
    "reply_count": 0,
    "retweet_count": 1,
    "quote_count": 0,
    "favorite_count": 0,
    "lang": "in",
    "created_date": "2016666-07-01",
    "created_time": "18:27:01",
    "hashtag": "",
    "tweet_json": {
        "created_at": "Fri Jul 01 18:27:01 +0000 2011",
        "source": "<a href=\"http://blackberry.com/twitter\" rel=\"nofollow\">Twitter for BlackBerry®</a>",
    }
}

mongo_helper = MongoHelper(settings.mongodb_host, settings.mongodb_port)
mongo_helper.update_one(db, col, d)
